1. Field of the Invention
The present invention relates to a method and an apparatus for detecting an angle of a rotating shaft, such as a crankshaft of an engine.
2. Description of the Related Art
Conventional engine control units utilize input signals supplied from various sensors, such as a crankshaft sensor, a coolant temperature sensor, and an air temperature sensor, to perform engine controls, such as fuel injection control and ignition timing control, thereby operating an engine under optimum conditions.
The input signals include a crank signal outputted from the crankshaft sensor. The crank signal consists of a train of crank pulses corresponding to angular positions of a crankshaft as it rotates. The pulse cycle of the pulse train corresponds to a predetermined angular interval of the crankshaft rotation.
One example of the conventional engine control units is disclosed in, for example, U.S. Pat. No. 6,493,628B2 corresponding to Japanese Unexamined Patent Publication No. 2001-271700.
The engine control unit disclosed in the publication is operative to multiply the frequency of the crank signal, thereby generating a multiplication clock signal. For details, the multiplication clock signal consists of a train of clock pulses whose clock cycle is a positive integral submultiple of the pulse cycle of the crank signal. The engine control unit is also operative to increment a crank counter indicative of a rotational position of the crankshaft, in other words, a crank angle thereof, in response to the multiplication clock signal to control the engine based on the count value of the crank counter. That is, the engine control unit is configured to control the engine in synchronization with the engine speed. The configuration makes it possible to grasp the crank angle with a resolution higher than that of the crank signal.
This type of engine control unit determines a guard value for each significant edge of each crank pulse of the crank signal. The guard value represents a value that the crank counter should take at a timing of the next significant edge of each significant edge of each crank pulse of the crank signal. Even if the engine accelerates or decelerates, the engine control unit would accurately determine, based on the guard value, the count value of the crank counter at the timing of the next significant edge of each significant edge of each crank pulse of the crank signal.
An example of the operations of the engine control unit will be explained in FIGS. 30 and 31. In this example, it is assumed that the crank counter is incremented in response to the multiplication clock signal whose frequency is 32 times that of the crank signal, in other words, the number of multiplication of the multiplication clock signal is set to “32”. It is also assumed that, as shown in FIG. 30, a part of the crank signal is represented as a train of crank pulses Pm−1, Pm, Pm+1. In this assumption, during a current pulse time interval Tm between the temporally adjacent crank pulses Pm+1 and Pm, the crank counter is incremented every time that is one-thirty second ( 1/32) of a previous pulse time interval Tm−1 between the temporally adjacent crank pulses Pm and Pm−1.
Assuming that the engine speed is constant, the crank counter is incremented at regular time intervals during any pulse interval in the crank signal. For example, as shown in FIG. 30, when the significant edge of the crank signal, in other words the leading edge, is generated every crank angle (CA) of 10 degrees, the crank counter is incremented with a resolution of the crank angle (CA) of 0.3125 degrees, which corresponds to LSB (Least Significant Bits). This is because the frequency of the multiple clock signal is 32 times that of the crank signal.
When the engine suddenly accelerates so that a pulse time interval of the crank signal becomes short, a next significant edge may be generated before the count value of the crank counter is incremented by 32. This may result in that the count value of the crank counter may be shifted to be small from the value of “32”. Similarly, when the engine suddenly decelerates so that a pulse time interval of the crank signal becomes long, the count value of the crank counter may be shifted to be large from the value of “32”.
In order to prevent the count value from being shifted from the multiplication value, such as “32”, as shown in FIG. 31, the guard value is set every significant edges of the crank signal. The guard value represents a value that the crank counter should take at a timing of each significant edge of each crank pulse of the crank signal.
When the engine suddenly accelerates during, for example, the current pulse time interval “Tm”, the count value of the crank counter is forcibly incremented at the next significant edge (the start timing of the next pulse time interval “Tm+1”) in response to an internal clock signal whose cycle is short from that of the multiplication clock signal. This allows the count value of the crank counter to be reached up to the guard value set at the current significant edge (the start timing of the current pulse time interval Tn).
It is assumed that the engine suddenly decelerates during, for example, the previous pulse time interval “Tm−1”. In this assumption, when the count value of the crank counter gets to the guard value set at the previous significant edge (the start timing of the previous pulse time interval “Tm−1”), the increment of the crank counter is forced to be terminated until the next significant edge (the start timing of the current pulse time interval Tm) is generated.